home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- PRODUCT : Paradox NUMBER : 584
- VERSION : All
- OS : DOS
- DATE : August 26, 1991 PAGE : 1/2
-
- TITLE : COPYING RECORDS USING SETKEYS
-
-
-
-
- Description of the CPYNPSTSCRIPT
-
- Frequently in Paradox, when editing or coediting records, the need may
- arise to make a copy of a complete record in a table. While Paradox
- does provide a Ditto key <CtrlD>, the range of this key is limited to
- copying a single field.
-
- This example script uses the Pal SETKEY command, in conjunction with
- the CopyToArray, and CopyFromArray commands, to provide the function
- of copying a complete record in a table.
-
- Creating the CPYNPST script
-
- From the Paradox Main Menu select:
-
- 1. Scripts
-
- 2. Editor
-
- 3. Write
-
- 4. At the 'Script:' prompt, type in:
-
- 5. CPYNPST<ENTER>
-
- 6. Type the following text into the script editor as two single
- lines: (Due to printer output constraints, the text of each
- single line is printed on two separate lines. Thus, in the
- first example, the line which begins with the 'sleep 1000'
- should be appended in your editor to the end of the previous
- line.)
-
-
- Line one of text:
-
- SETKEY -46 copytoarray clip message "Copying current record"
- sleep 1000; Alt C
- Line two of text:
-
- SETKEY -25 ins copyfromarray clip message "Pasting stored
- record" sleep 1000; Alt P
-
- 7. Press F2 to save the script file CPYNPST.SC
-
-
-
-
-
-
-
-
-
-
-
-
-
- PRODUCT : Paradox NUMBER : 584
- VERSION : All
- OS : DOS
- DATE : August 26, 1991 PAGE : 2/2
-
- TITLE : COPYING RECORDS USING SETKEYS
-
-
-
-
- Using the CPYNPST Script
-
-
- To initialize the AltC and AltP keys for Cutting and Pasting, select
- from the Paradox Main menu:
-
- 1. Scripts
-
- 2. Play
-
- 3. At the 'Script:' prompt type in:
-
- 4. CPYNPST<ENTER>
-
- Once the script has been played, the <AltC> key will store the record
- at current cursor position. The <ALTP> key will retrieve the stored
- record.
-
-
- Additional examples/variations
-
-
- To physically move a record, that is cut and paste a record, the above
- example setkeys could be modified as follows:
-
- SETKEY -46 copytoarray clip del message "Cutting current record"
- sleep 1000; Alt C
-
- SETKEY -25 copyfromarray clip message "Pasting stored record" sleep
- 1000; Alt P
- An example setkey definition which will ditto the previous record into
- the current record position is:
-
- SETKEY -32 up copytoarray x down ins copyfromarray x message "Copying
- record" sleep 1000; Alt D
-
- (Again in your script, each setkey definition must be entered on a
- single line. See your PAL Manual for a more complete reference of the
- setkey command.)
- If you wish to have one of these scripts loaded automatically, refer
- to Chapter 14 in your Paradox User's Guide for information on INIT
- scripts.
-
-
-
-
-
-
-
-